package com.wyj.controller;

import com.wyj.service.impl.YlrcUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author ：wyj
 * @description：TODO
 * @date ：2022/11/19 8:14 下午
 */
@RestController
@RequestMapping("/userMenus")
public class UserMenusController {

    @Autowired
    YlrcUserServiceImpl ylrcUserServiceImpl;

    //查询某个用户下的菜单
    @GetMapping
    public List<Map<String,Object>> getUserAndMenus(@RequestParam("username") String username) {
        return ylrcUserServiceImpl.getUserAndMenus(username);
    }


}
